package com.histone.grab_ticket.service;

import com.histone.grab_ticket.entity.UserEntity;
import com.histone.grab_ticket.repo.UserDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class UserService {
    @Autowired
    private UserDao userDao;

    public UserEntity getUserByUsername(String name){
        return userDao.findByUsername(name);
    }

    public UserEntity save(UserEntity user){
        return userDao.save(user);
    }

}
